<include file="Index/header" />
    <!--sidebar left start-->
    <include file="Index/nav" />
    <!--左侧栏 end-->
    <!--主内容 start-->
    <section class="main-content-wrapper">
        <section id="main-content">
            
            <div class="row">
                    <div class="col-md-12">
                        <div class="panel panel-default">
                            <div class="panel-heading">
                                <h3 class="panel-title">推送消息</h3>
                                <div class="actions pull-right">
                                    <i class="fa fa-chevron-down"></i>
                                    <i class="fa fa-times"></i>
                                </div>
                            </div>
                            <div class="panel-body"> 
                            	<div class="col-sm-6">
	                            	<input class="form-control" type="text" name="" id="clent_id" value="" placeholder="客户ID" />
	                            	<input class="form-control" type="text" name="" id="msg" value="" placeholder="消息内容"/>
								<button onclick="pushmsg()" class="btn btn-primary">推送</button>
								<button onclick="pushlogin()" class="btn btn-primary">登录</button>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
          
            
        </section>
    </section>
    <!--主内容区 end-->
    <script src="/Public/js/admin/content.js" type="text/javascript" charset="utf-8"></script>
    <script type="text/javascript">
    	function pushmsg () {
    		$.ajax({
	    		type:"post",
	    		url:"/admin.php?c=push&a=add",
	    		async:true,
	    		data:{
	    			client_id:$('#clent_id').val(),
	    			msg:$('#msg').val(),
	    		},
	    		success:function  (ret) {
	    			console.log(ret)
	    		},
	    		error:function  (err) {
	    			console.log(err)
	    		}
	    	});
    	}
    	
    	function pushlogin () {
    		$.ajax({
	    		type:"post",
	    		url:"/admin.php?c=push&a=login",
	    		async:true,
	    		data:{
	    			client_id:$('#clent_id').val(),
	    			msg:$('#msg').val(),
	    			user:'admin',
	    		},
	    		success:function  (ret) {
	    			console.log(ret)
	    		},
	    		error:function  (err) {
	    			console.log(err)
	    		}
	    	});
    	}
    </script>
        
<include file="Index/footer" />